/**
* 
* ====================================================================
*
* @author apov <apov@ymail.com>
*/ 
#pragma once

#include "DBResultSet.h"
#include <mysql.h>

class MySQL_DBSession;
class MySQL_DBResultSet : public DBResultSet{
public:
	virtual int next();
	virtual void reset();	

	virtual size_t getAffectedCount();
	
	virtual char getByte();
	virtual short get2Byte();
	virtual int get4Byte();
	virtual __int64 get8Byte();
	virtual int getString( char* buffer, size_t size );
	virtual int getMemory( char* buffer, size_t size );
	virtual double getFloat();

	virtual int get_resultset_desc( void* handle, DBTableDescription& table_desc );

	MySQL_DBResultSet();
	virtual ~MySQL_DBResultSet();

protected:

private:
	friend class MySQL_DBStatement;
	
	MYSQL_RES* result_set_;
	MYSQL_ROW row_;
	int field_count_;
	int current_get_field_;
};
